﻿/*============================================
 * 类名 :ResultParameter
 * 描述 :用以显示推理结果的参数类
 *   
 * 创建时间: 2010/7/28 21:54:31
 * Blog:   http://home.cnblogs.com/xiangism
 *============================================*/
using System;
using System.Collections.Generic;

using System.Text;

namespace 命题证明
{
    /// <summary>用以显示推理结果的参数类</summary>
    class ResultParameter
    {
        public ResultParameter( string _content, string lawname )
        {
            Content = _content;
            //Previous = pre;
            LawName = lawname;
        }
        /// <summary>这个节点的中序内容</summary>  
        public string Content { get; set; }

        List<int> p = new List<int>();
        /// <summary>这个节点前面的节点号</summary>  
        public List<int> Previous
        {
            get { return p; }
            set { p = value; }
        }
        /// <summary>得到这个节点的公式名</summary>  
        public string LawName { get; set; }

        public override string ToString()
        {
            string r = Content;
            Previous.Sort();
            for ( int i = 0; i < Previous.Count; ++i )
            {
                r += Previous[i].ToString();
            }
            r += LawName;
            return r;
        }

    }
}
